package com.midian.model.sys;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import org.apache.commons.lang3.StringUtils;

import com.midian.common.utils.StringUtil;
import com.midian.model.common.BaseModel;

/**
 * 系统配置
 * 
 */
@Entity
@Table(name = "sys_conf")
public class SysConf extends BaseModel {
	/**父id*/
	private Integer parentId;
	/**键*/
	@Column(name="[key]",nullable=false)
	private String key;
	private String code;
	/**值*/
	private String val;
	private Integer type;

	public Integer getParentId() {
		return parentId;
	}

	public void setParentId(Integer parentId) {
		this.parentId = parentId;
	}

	public String getKey() {
		return key;
	}
	
	public void setKey(String key) {
		this.key = key;
	}
	
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getVal() {
		return val;
	}

	public void setVal(String val) {
		this.val = val;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}
	/**系统配置管理模块详情提示*/
	public String getValTips() {
		String valTips="";
		if(StringUtils.isNotBlank(this.val)){
			valTips = StringUtil.replaceToHtmlQuot(this.val);
		}
		return valTips;
	}
	
//	/**注册协议*/
//	public String getRegisterTips() {
//		String registerTips="";
//		if(StringUtils.isNotBlank(this.val)){
//			aboutusTips = StringUtil.replaceToHtmlQuot(this.val);
//		}
//		return aboutusTips;
//	}
	
}
